<?php
namespace App\Services\Recommend;

use App\Services\ProjectValidate;
/**
 * @Author: Marte
 * @Date:   2017-05-27 16:25:13
 * @Last Modified by:   ws
 * @Last Modified time: 2018-06-12 10:16
 */
class ValidateRecommend extends ProjectValidate
{
    /**
     * 自定义子类初始化
     * @param array $initData
     * @return mixed
     */
    public function initValidate($initData = [])
    {
//        if (!empty($initData['c_id'])) {
//            $this->rules['c_id']  = 'numeric|min:0';
//        }
    }
    
    public $rules = [
        'app_id'  => 'int|min:1',
        'is_public' => 'in:0,1',
        'action' => 'min:2',
        'name'  => 'between:2,25',
        'id'    => 'int|min:1',
    	'pid'   => 'int|min:0',
    	'order' => 'int|min:1',
    	'status'=> 'in:0,1',
    ];


    public $messages = [
       
    ];

    /**
     * @var array 上面规则中定义的 key 的名字
     */
    public $attributes = [
      
    ];
}